package com.zyx.controller;


import com.zyx.annotation.UserLoginToken;
import com.zyx.pojo.Department;
import com.zyx.pojo.RespBean;
import com.zyx.service.IDepartmentService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("//department")
public class DepartmentController {
    @Autowired
    private IDepartmentService departmentService;

    @UserLoginToken
    @GetMapping("/getDepartmentList")
    @ApiOperation(value = "获得部门信息")
    public RespBean getDepartmentList(){
        List<Department> list = departmentService.list();
        return RespBean.success("修改成功",list);


    }

}
